package lh2;

public class Demanda {
    public static String INSERTAR="insertar";
    public static String ELIMINAR="eliminar";
    public static String BUSCAR="buscar";
    public static String RECUPERAR="recuperar";
    public static String DIFFIEHELMAN="dh";
    public static String INTEGRAR="integrar";
    public static String DESBORDE="desborde";
    public static String DIVISION="division";
    public static String ACTUALIZAR="actualizar";
    public String operacion;
    public int clave;
    public String cadena;

    public Demanda(String operacion, int clave, String cadena){
            this.operacion=operacion;
            this.clave=clave;
            this.cadena=cadena;
    }

    public Demanda(String operacion, int clave){
            this.operacion=operacion;
            this.clave=clave;
    }

    public Demanda(String operacion, String cadena){
            this.operacion=operacion;
            this.cadena=cadena;
    }
    public Demanda(String operacion){
            this.operacion=operacion;
    }
    public String getOperacion(){
        return this.operacion;
    }
    public int getClave(){
        return this.clave;
    }
    public String getCadena(){
        return this.cadena;
    }

    public boolean forwardeable()
    {
        return !(operacion.equals(Demanda.INSERTAR) || operacion.equals(Demanda.DIFFIEHELMAN) || operacion.equals(Demanda.DESBORDE) || operacion.equals(Demanda.DIVISION));
    }	
}
